//票据收取机初始化
function Check_Readeroninit() {
	var readeroninit = ZKJCNonStdEqpt.ReaderOninit(0);
	
	if(readeroninit == "0") {
		var readersetform_frontside = ZKJCNonStdEqpt.ReaderSetForm("","FrontsideCamera","1",0);
		var readersetform_rearside = ZKJCNonStdEqpt.ReaderSetForm("","RearsideCamera","1",0);
		var readersetform_filePathF = ZKJCNonStdEqpt.ReaderSetForm("","FilePathF","C:\\Images\\",0);
		var readersetform_filePathR = ZKJCNonStdEqpt.ReaderSetForm("","FilePathR","C:\\Images\\",0);
		if(readersetform_frontside == "0" && readersetform_rearside == "0" && readersetform_filePathR == "0" && readersetform_filePathF == "0") {
			return '0';
		} else {
			return '-1';
		}
	} else {
		return '-1';
	}
}

//开启售票口闸门，放入票据
function Check_Readputdoc() {
	var readerputdoc = ZKJCNonStdEqpt.ReaderPutDoc(0);
	return readerputdoc;
}

//支票——设置扫描参数
function Check_Readersetform() {
	var readersetform_frontside = ZKJCNonStdEqpt.ReaderSetForm("","FrontsideCamera","1",0);
	var readersetform_rearside = ZKJCNonStdEqpt.ReaderSetForm("","RearsideCamera","1",0);
	var readersetform_filePathF = ZKJCNonStdEqpt.ReaderSetForm("","FilePathF","C:\\Images\\",0);
	var readersetform_filePathR = ZKJCNonStdEqpt.ReaderSetForm("","FilePathR","C:\\Images\\",0);
	
	if(readersetform_frontside == "0" && readersetform_rearside == "0" && readersetform_filePathR == "0" && readersetform_filePathF == "0") {
		return '0';
	} else {
		return '-1';
	}
}

//贷记凭证——设置扫描参数
function Bill_Readersetform() {
	var readersetform_frontside = ZKJCNonStdEqpt.ReaderSetForm("","FrontsideCamera","1",0);
	var readersetform_filePathF = ZKJCNonStdEqpt.ReaderSetForm("","FilePathF","C:\\Images\\",0);

	if(readersetform_frontside == "0" && readersetform_filePathF == "0") {
		return '0';
	} else {
		return '-1';
	}
}

//扫描票据
function Check_Readerprocessform() {
	var readerprocessform = ZKJCNonStdEqpt.ReaderProcessForm("",0);
	return readerprocessform;
}

//关闭进票口
function Check_Readercloseshutter() {
	var readercloseshutter = ZKJCNonStdEqpt.ReaderCloseShutter(0);
	return readercloseshutter;
}

//获取扫描信息( ReaderReadForm)影像的地址
function getScanInfo(formkey) {
	if(formkey == "0") {//0 表示 要拿到正面影像全路径
		//获取影像的正面图像全路径
		var frontIMGPath = ZKJCNonStdEqpt.ReaderReadForm("","FrontIMGPath",0);
		if(frontIMGPath == "") {
			//没有找到图像
			return '-1';
		}
		return frontIMGPath;
	}
	
	if(formkey == "1") {//1 表示 要拿到背面影像全路径
		//获取影像的背面图像全路径
		var rearIMGPath = ZKJCNonStdEqpt.ReaderReadForm("","RearIMGPath",0);
		if(rearIMGPath == "") {
			//没有找到图像
			return '-1';
		}
		return rearIMGPath;
	}
	
	if(formkey == "2") {//2 表示要拿到MICR识读内容
		//获取MICR识读内容
		var micrReaded = ZKJCNonStdEqpt.ReaderReadForm("","MICRReaded",0);
		if(micrReaded == "") {
			//没有找到MICRReaded识读内容
			return '-1';
		}
		return micrReaded;
	}
	
	if(formkey == "3") {//3 表示要拿到OCR识读内容
		//获取OCR识读内容
		var ocrReaded = ZKJCNonStdEqpt.ReaderReadForm("","OCRReaded",0);
		if(ocrReaded == "") {
			//没有找到OCR识读内容
			return '-1';
		}
		return ocrReaded;
	}
	
	if(formkey == "4") {//4表示判断影像
		var imgCheckResult = ZKJCNonStdEqpt.ReaderReadForm("","IMGCheckResult",0);
		return imgCheckResult;
	}
	
	if(formkey == "5") {//5 二维码识别
		var qrCode = ZKJCNonStdEqpt.ReaderReadForm("","QRCode",0);
		return qrCode;
	}
	
	if(formkey == "6") {//失败信息
		var imgCheckResultDesc = ZKJCNonStdEqpt.ReaderReadForm("","IMGCheckResultDesc",0);
		return imgCheckResultDesc;
	}
}

//存票
function Check_ReaderacceptdocSave() {
	var readeracceptdoc = ZKJCNonStdEqpt.ReaderAcceptDoc(1,0);
	return readeracceptdoc;
}

//退票
function Check_ReaderacceptdocBack() {
	var readeracceptdoc = ZKJCNonStdEqpt.ReaderAcceptDoc(0,0);
	return readeracceptdoc;
}

//关闭退票口闸门，将票据回收至废票口
function Check_Readerretractdoc(time) {
	var readerretractdoc = ZKJCNonStdEqpt.ReaderRetractDoc(time);
	return readerretractdoc;
}


















